Optimal. Leaf size=85 \[ -\frac {c^3 \tanh ^{-1}(\sin (e+f x))}{a^2 f}+\frac {4 c^3 \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)}-\frac {8 c^3 \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)^2}+\frac {c^3 x}{a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.33, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 9, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.346, Rules used = {3903, 3777, 3919, 3794, 3796, 3797, 3799, 3998, 3770} \[ -\frac {c^3 \tanh ^{-1}(\sin (e+f x))}{a^2 f}+\frac {4 c^3 \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)}-\frac {8 c^3 \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)^2}+\frac {c^3 x}{a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3770
Rule 3777
Rule 3794
Rule 3796
Rule 3797
Rule 3799
Rule 3903
Rule 3919
Rule 3998
Rubi steps
\begin {align*} \int \frac {(c-c \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx &=\frac {\int \left (\frac {c^3}{(1+\sec (e+f x))^2}-\frac {3 c^3 \sec (e+f x)}{(1+\sec (e+f x))^2}+\frac {3 c^3 \sec ^2(e+f x)}{(1+\sec (e+f x))^2}-\frac {c^3 \sec ^3(e+f x)}{(1+\sec (e+f x))^2}\right ) \, dx}{a^2}\\ &=\frac {c^3 \int \frac {1}{(1+\sec (e+f x))^2} \, dx}{a^2}-\frac {c^3 \int \frac {\sec ^3(e+f x)}{(1+\sec (e+f x))^2} \, dx}{a^2}-\frac {\left (3 c^3\right ) \int \frac {\sec (e+f x)}{(1+\sec (e+f x))^2} \, dx}{a^2}+\frac {\left (3 c^3\right ) \int \frac {\sec ^2(e+f x)}{(1+\sec (e+f x))^2} \, dx}{a^2}\\ &=-\frac {8 c^3 \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}-\frac {c^3 \int \frac {-3+\sec (e+f x)}{1+\sec (e+f x)} \, dx}{3 a^2}-\frac {c^3 \int \frac {\sec (e+f x) (-2+3 \sec (e+f x))}{1+\sec (e+f x)} \, dx}{3 a^2}-\frac {c^3 \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{a^2}+\frac {\left (2 c^3\right ) \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{a^2}\\ &=\frac {c^3 x}{a^2}-\frac {8 c^3 \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}+\frac {c^3 \tan (e+f x)}{a^2 f (1+\sec (e+f x))}-\frac {c^3 \int \sec (e+f x) \, dx}{a^2}-\frac {\left (4 c^3\right ) \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{3 a^2}+\frac {\left (5 c^3\right ) \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{3 a^2}\\ &=\frac {c^3 x}{a^2}-\frac {c^3 \tanh ^{-1}(\sin (e+f x))}{a^2 f}-\frac {8 c^3 \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}+\frac {4 c^3 \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 1.10, size = 216, normalized size = 2.54 \[ -\frac {c^3 (\cos (e+f x)-1)^3 \cot \left (\frac {1}{2} (e+f x)\right ) \csc ^2\left (\frac {1}{2} (e+f x)\right ) \left (4 \tan \left (\frac {e}{2}\right ) \cot \left (\frac {1}{2} (e+f x)\right ) \csc ^2\left (\frac {1}{2} (e+f x)\right )+4 \sec \left (\frac {e}{2}\right ) \sin \left (\frac {f x}{2}\right ) \csc ^3\left (\frac {1}{2} (e+f x)\right )+3 \cot ^3\left (\frac {1}{2} (e+f x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )+f x\right )-4 \sec \left (\frac {e}{2}\right ) \sin \left (\frac {f x}{2}\right ) \cot ^2\left (\frac {1}{2} (e+f x)\right ) \csc \left (\frac {1}{2} (e+f x)\right )\right )}{6 a^2 f (\cos (e+f x)+1)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.46, size = 173, normalized size = 2.04 \[ \frac {6 \, c^{3} f x \cos \left (f x + e\right )^{2} + 12 \, c^{3} f x \cos \left (f x + e\right ) + 6 \, c^{3} f x - 3 \, {\left (c^{3} \cos \left (f x + e\right )^{2} + 2 \, c^{3} \cos \left (f x + e\right ) + c^{3}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, {\left (c^{3} \cos \left (f x + e\right )^{2} + 2 \, c^{3} \cos \left (f x + e\right ) + c^{3}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 8 \, {\left (c^{3} \cos \left (f x + e\right ) - c^{3}\right )} \sin \left (f x + e\right )}{6 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.82, size = 90, normalized size = 1.06 \[ \frac {4 c^{3} \left (\tan ^{3}\left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{3 f \,a^{2}}+\frac {c^{3} \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right )}{f \,a^{2}}-\frac {c^{3} \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right )}{f \,a^{2}}+\frac {2 c^{3} \arctan \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{f \,a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 268, normalized size = 3.15 \[ \frac {c^{3} {\left (\frac {\frac {9 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{a^{2}} - \frac {6 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a^{2}} + \frac {6 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a^{2}}\right )} - c^{3} {\left (\frac {\frac {9 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a^{2}}\right )} + \frac {3 \, c^{3} {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2}} - \frac {3 \, c^{3} {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2}}}{6 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.41, size = 46, normalized size = 0.54 \[ \frac {c^3\,x}{a^2}-\frac {c^3\,\left (2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )-\frac {4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{3}\right )}{a^2\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ - \frac {c^{3} \left (\int \frac {3 \sec {\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \left (- \frac {3 \sec ^{2}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\right )\, dx + \int \frac {\sec ^{3}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \left (- \frac {1}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\right )\, dx\right )}{a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________